#include "list.h"
#include "language.h"

#ifndef _GRAPH_
#define _GRAPH_
typedef struct structGraphNode GraphNode;
typedef struct structGraph Graph;

//! Defines a linked list node
struct structGraphNode
{
	//! A pointer to a block of memory
	void *Value;
	//! An adjacency list implemented with an array
	List Adjacent;
};

//! Defines a linked list object
struct structGraph
{
	//! An arbitrary node in the graph
	struct structGraphNode *Handle;
	
	void (*CreateEdge)(GraphNode *n, GraphNode *adjacent);
};

GraphNode *new_GraphNode(void);
Graph new_Graph(void);
void destroy_Graph(Graph *g);

#endif
